package Class9_7;

public class Work {
    public static void main(String[] args) {
        int n=0;
        String a="狗";
        String b="这是一只狗，一只狗 ，狗，狗";
        char[]c=a.toCharArray();
        System.out.println(c);
        char[]d=b.toCharArray();
        System.out.println(d);
        for (int i=0;i<d.length;i++){
            if (c[0]==d[i]){
                n++;
            }
        }
        System.out.println(n);
    }
}
